//
//  PersonManager.m
//  ShanMei
//
//  Created by huazi on 15/3/12.
//  Copyright (c) 2015年 huazi. All rights reserved.
//

#import "PersonManager.h"

@implementation PersonManager
+ (instancetype)sharePersonManager{

    static PersonManager *_personManager =nil;
    static dispatch_once_t predicate;
    dispatch_once(&predicate, ^{
        _personManager =[[PersonManager alloc] init];
    });
    return _personManager;
}
- (id)init
{
    if (self =[super init])
    {
        
    }
    return self;
}
- (void)loginedSetDataForperson
{
    Person *_person =[Person sharePerson];
    BOOL logined =[[NSUserDefaults standardUserDefaults] boolForKey:kLogined];
    if (logined)
    {
        _person.isLogin =YES;
//        _person.loginType =[[NSUserDefaults standardUserDefaults] objectForKey:kLoginType];
        NSDictionary *personDic =[[NSUserDefaults standardUserDefaults] objectForKey:kUserDic];
        [_person initDataWithDic:personDic];
//        [[XMPPManager shareXMPPManager] connectWithUsedName:_person.userId AndWithUsedPassword:@"111111"];
    }
}
@end
